From 4f7f0d55780897ad2505c9e70b5cf8faef59c79c Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Wed, 27 Apr 2005 10:35:49 +0000 Subject: [PATCH] bitkeeper revision 1.1385.1.3 (426f6b05kK8EBkiTLCXBeJZCPG2ZgQ) Cset exclude: bren@br260.wolfson.cam.ac.uk|ChangeSet|20050426221254|30123 --- tools/libxc/xc_domain.c | 2 +- xen/common/dom0_ops.c | 3 +-- xen/common/dom_mem_ops.c | 3 --- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index 85bd481180..1d8815a8a6 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -35,7 +35,7 @@ int xc_domain_create(int xc_handle, goto fail; if ( (err = do_dom_mem_op(xc_handle, MEMOP_increase_reservation, - NULL, mem_kb/4 + 1, 0, *pdomid)) != (mem_kb/4) ) + NULL, mem_kb/4, 0, *pdomid)) != (mem_kb/4) ) { if ( err > 0 ) errno = ENOMEM; diff --git a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c index 0d3966f994..da454a479a 100644 --- a/xen/common/dom0_ops.c +++ b/xen/common/dom0_ops.c @@ -411,8 +411,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op) d = find_domain_by_id(op->u.setdomainmaxmem.domain); if ( d != NULL ) { - d->max_pages = (op->u.setdomainmaxmem.max_memkb + - ((PAGE_SIZE-1)>>10)) >> (PAGE_SHIFT-10); + d->max_pages = op->u.setdomainmaxmem.max_memkb >> (PAGE_SHIFT-10); put_domain(d); ret = 0; } diff --git a/xen/common/dom_mem_ops.c b/xen/common/dom_mem_ops.c index 9b5d50cfc2..698f6ee835 100644 --- a/xen/common/dom_mem_ops.c +++ b/xen/common/dom_mem_ops.c @@ -61,9 +61,6 @@ alloc_dom_mem(struct domain *d, return i; } - /* Initialise the machine-to-phys mapping for this page. */ - set_machinetophys(page_to_pfn(page), d->tot_pages - 1); - /* Inform the domain of the new page's machine address. */ if ( (extent_list != NULL) && (__put_user(page_to_pfn(page), &extent_list[i]) != 0) ) -- 2.30.2